1. Field of the Invention
The present invention relates to numerical controllers for controlling machine tools, and more particularly, to a numerical controller for controlling the operation of individual axes of a machine tool in accordance with data stored in the form of tables.
2. Description of Related Art
In some conventional numerical controllers known in the art, the operation of individual axes of a machine tool is controlled not by block commands of an NC program, but in accordance with data stored in the form of tables in which amounts of travel and positions of the axes are set beforehand. With such numerical controllers, the tool can be made to move freely without the restraints of block commands conventionally used, thereby shortening the machining time and achieving high-precision machining.
For example, a numerical control technique is known in which positions of movable axes relative to time or rotational angle are stored as numerical control data, the time or the rotational angle is monitored, and each time the stored time or rotational angle is reached, corresponding numerical control data of the movable axes is outputted (cf. JP 59-177604A).
There has also been known a numerical controller which is provided with data tables storing command positions for X and Z axes relative to a reference position, and in which the reference position is obtained by multiplying the value of a counter for counting reference pulses by an override value, and based on the obtained reference position, X- and Z-axis command positions stored in the data tables are outputted to perform synchronization control of the X and Z axes. With this numerical controller, override can be applied even while the operation is controlled in accordance with the data stored in the data tables. Further, it is possible to instruct whether the command positions are to be connected by using a linear function, a quadratic function or a cubic function, as well as to command an auxiliary function (cf. JP 2003-303005A).
FIGS. 13 to 15 schematically illustrate the operation according to table data, disclosed in JP 2003-303005A.
In the example shown in FIG. 13, an X-axis path table Tx and a Z-axis path table Tz are provided. FIG. 14 exemplifies the X-axis path table Tx in which are stored positions for the X axis relative to a reference position. FIG. 15 is a graph showing the positions of the X axis moved in accordance with the X-axis path table Tx shown in FIG. 14.
The Z-axis path table Tz similarly stores positions for the Z axis relative to the reference position. Pulses (spindle position) from a position coder provided at the spindle or time-based pulses from an external pulse generator are inputted to a counter 1 and counted thereby. A multiplier 2 multiplies the count of the counter 1 by an override value set in override means, and the result is inputted to a reference position counter 3. The reference position counter 3 is reset when path table operation function is commanded The value of the reference position counter 3 is inputted, as the reference position, to X- and Z-axis path table interpolators 4x and 4z. The X- and Z-axis path table interpolators 4x and 4z look up the respective X- and Z-axis path tables Tx and Tz to obtain X- and Z-axis command positions relative to the reference position, then obtain respective amounts of travel for the processing period, and output the obtained motion amounts as commands to respective control axis motors 5x and 5z to synchronously operate the X and Z axes in accordance with the reference position.
In machine tools, the machining path needs to be corrected so as to compensate for wear or mounting error of the tool, and usually, tool compensation is performed for the purpose. Such tool compensation is carried out also in the case of the aforementioned table data-based operation (hereinafter referred to as path table operation). Specifically, in JP 2003-303005A mentioned above, a tool compensation table storing tool compensation numbers to be commanded on the basis of the spindle position or time is prepared for each axis, and based on the table, the difference between a compensation amount corresponding to the offset number and the previous compensation amount is outputted to the corresponding axis at the commanded spindle position or reference time. FIG. 16 illustrates the tool compensation for the X-axis disclosed in JP 2003-303005A. Each compensation table stores tool compensation numbers in association with the spindle position or time on the basis of which the tool compensation is performed, tool compensation amounts for the corresponding axis are obtained based on the tool compensation numbers, and at the commanded spindle position or time, the difference between the tool compensation amounts is outputted in one lump. No problem arises if the difference between the tool compensation amounts is small. If the difference between the compensation amounts is large, however, a large offset is outputted at a time, with the result that the tool velocity suddenly changes at the commanded position, possibly exerting an adverse influence on the machining because of mechanical shock or the like.